import React from 'react';
import ReactDOM from 'react-dom';

import {Router,Route,hashHistory,IndexRoute} from 'react-router';
import {Provider} from 'react-redux';
import store from './store/index';
import reducer from './reducers/index';
import DevTools from './store/DevTools';

import App from './modules/App.js';
import Home from './modules/Home.js';
import About from './modules/About.js';
import Carts from './modules/Carts.js';
import Product from './modules/Product.js';
import News from './modules/News.js';
import Comment from './modules/Comment.js';
import ProductDetail from './modules/ProductDetail.js';

// const store = finalCreateStore(reducer);


ReactDOM.render(
    <Provider store={store}>
        <div>
            <Router history={hashHistory}>
                <Route path="/" component={App}>
                    <IndexRoute component={Home}/>
                    <Route path="/about" component={About}/>
                    <Route path="/carts" component={Carts}/>
                    <Route path="/product" component={Product}/>
                    <Route path="/news" component={News}/>
                    <Route path="/comment/:data" component={Comment}/>
                    <Route path='/ProductDetail/:id' component={ProductDetail}/>
                </Route>
            </Router>
        </div>
    </Provider>
    ,document.getElementById('app')
);